<div class="dux-page-header am-cf">
	<div class="page-title">
		<a class="am-btn am-btn-primary" href="{url('index')}"> 广告列表</a>
	</div>
	<div class="page-action">
		<a class="am-btn am-btn-danger" href="javascript:location.reload();"><i class="am-icon-refresh"></i></a>
	</div>
</div>

<div class="dux-body">
	<div class="am-panel am-panel-default dux-panel">
		<div class="am-panel-hd">{$assignName}广告</div>
		<div class="am-panel-bd">
			<form class="am-form  am-form-horizontal dux-form" data-dux="form-bind" method="post">
				<fieldset>
					<div class="am-form-group">
						<label class="am-u-md-2 am-u-sm-12 am-form-label">广告标题</label>
						<div class="am-u-md-10 am-u-sm-12">
							<input type="text" name="title" value="{$info.title}" placeholder="请输入广告标题" required>
						</div>
					</div>

					<div class="am-form-group">
						<label class="am-u-md-2 am-u-sm-12 am-form-label">广告位</label>
						<div class="am-u-md-10 am-u-sm-12">
							<select name="pos_id" id="pos_id" class="am-form-field" required>
								<!--loop{$posList as $vo}-->
								<option value="{$vo.pos_id}"
								<!--if{ $vo['pos_id'] == $info['pos_id'] }--> selected <!--{/if}-->
								>{$vo.name}</option>
								<!--{/loop}-->
							</select>
						</div>
					</div>

					<div class="am-form-group " >
						<label class="am-u-md-2 am-u-sm-12 am-form-label">广告图片</label>
						<div class="am-u-md-10 am-u-sm-12">
							<div class="am-input-group">
								<input class="am-form-field" name="image" id="image" value="{$info.image}"
									   placeholder="可选,上传导航封面图">
										<span class="am-input-group-btn">
											<button class="am-btn am-btn-default" type="button" data-dux="form-upload"
													data-target="#image" data-type="jpg,png,bmp"><i
													class="am-icon-upload"></i></button>
										</span>
								<span class="am-input-group-btn">
											<button class="am-btn am-btn-default" type="button" data-dux="form-imgShow"
													data-target="#image" ><i class="am-icon-photo"></i></button>
										</span>
							</div>
						</div>
					</div>

					<div class="am-form-group">
						<label class="am-u-md-2 am-u-sm-12 am-form-label">开始时间</label>
						<div class="am-u-md-10 am-u-sm-12">
							<!--if{$info.start_time}-->
							<input type="date" name="start_time" value="{date('Y-m-d H:i:s',$info.start_time)}" >
							<!--{else}-->
							<input type="date" name="start_time" value="">
							<!--{/if}-->
						</div>
					</div>
					<div class="am-form-group">
						<label class="am-u-md-2 am-u-sm-12 am-form-label">结束时间</label>
						<div class="am-u-md-10 am-u-sm-12">
							<!--if{$info.stop_time}-->
							<input type="date" name="stop_time" value="{date('Y-m-d H:i:s',$info.stop_time)}" >
							<!--{else}-->
							<input type="date" name="stop_time" value="">
							<!--{/if}-->
						</div>
					</div>


					<div class="am-form-group">
						<label class="am-u-md-2 am-u-sm-12 am-form-label">URL链接</label>
						<div class="am-u-md-10 am-u-sm-12">
							<input type="text" name="url" value="{$info.url}" placeholder="请输入广告超链接地址" >
						</div>
					</div>

					<!--loop{$urlField as $vo}-->
					<div class="am-form-group">
						<label class="am-u-md-2 am-u-sm-12 am-form-label">{$vo}链接</label>
						<div class="am-u-md-10 am-u-sm-12">
							<input type="text" name="url_ext[{$vo}]" value="{$info.url_ext[$vo]}" placeholder="请输入{$vo}链接" >
						</div>
					</div>
					<!--{/loop}-->

					<div class="am-form-group">
						<label class="am-u-md-2 am-u-sm-12 am-form-label">广告顺序</label>
						<div class="am-u-md-10 am-u-sm-12">
							<input type="number" name="sort" value="{$info.sort ? $info.sort : 0}" placeholder="请输入顺序" >
						</div>
					</div>

					<div class="am-form-group">
						<label class="am-u-md-2 am-u-sm-12 am-form-label">广告内容</label>
						<div class="am-u-md-10 am-u-sm-12">
							<textarea name="content" placeholder="广告文字内容">{$info.content}</textarea>
						</div>
					</div>

					<div class="am-form-group">
						<label class="am-u-md-2 am-u-sm-12 am-form-label">状态</label>
						<div class="am-u-md-10 am-u-sm-12">
							<div class="am-g">
								<?php if(!isset($info['status'])) $info[ 'status']=1 ; ?>
								<label class="am-radio-inline">
									<!--if{$info['status']}-->
									<input name="status" checked="checked" value="1" type="radio">
									<!--{else}-->
									<input  name="status" value="1" type="radio">
									<!--{/if}-->
									正常
								</label>

								<label class="am-radio-inline">
									<!--if{!$info['status']}-->
									<input name="status" value="0" checked="checked" type="radio">
									<!--{else}-->
									<input name="status" value="0" type="radio">
									<!--{/if}-->
									禁用
								</label>
							</div>
						</div>
					</div>


					<div class="am-form-group">
						<div class="am-u-sm-offset-12 am-u-md-offset-2">
							<input type="hidden" name="adv_id" value="{$info.adv_id}">
							<button class="am-btn am-btn-primary" type="submit" disabled>保存</button>
						</div>
					</div>

				</fieldset>
			</form>
		</div>
	</div>
</div>